/*stata formats*/

/*Assign labels to each of the 53 variables*/
/*copy and paste formats from stata formats document*/
label variable phseq "Household Sequence Number"
label variable hnumper "Number of Persons in Household"
label variable alineno "Person Line Number"
label variable esiph "ESI policy holder?"
label variable esidep "ESI dependent?"
label variable ophiph "Other private health insurance policy holder?"
label variable ophidep "Other private health insurance dependent?"
label variable exchange "Enrolled in health exchange? (for persons with OPHI coverage)"
label variable nmcaid "Covered by Medicaid?"
label variable nmcare "Covered by Medicare?"
label variable champ "Covered by Military?"
label variable other "Covered by Other?"
label variable chipp "Covered by Childrens Health Insurance?"
label variable anycov "Any Health Coverage?"
label variable outtyp "Coverage from outside of household?"
label variable concurr "Concurrent coverage last year?"
label variable subsidy "Any subsidized marketplace coverage last year?"
label variable pitesiph "Point in Time ESI policy holder?"
label variable pitesidep "Point in Time ESI dependent?"
label variable pitophiph "Point in Time Other private health insurance policy holder?"
label variable pitophidep "Point in Time Other private health insurance dependent?"
label variable pitexchange "Point in Time enrolled in health exchange?"
label variable pitnmcaid "Point in Time Covered by Medicaid?"
label variable pitnmcare "Point in Time Covered by Medicare?"
label variable pitchamp "Point in Time Covered by Military?"
label variable pitother "Point in Time Covered by Other?"
label variable pitchipp "Point in Time Covered by Childrens Health Insurance?"
label variable now_anycov "Point in Time any Health Coverage?"
label variable pitouttyp "Point in Time coverage from outside of household?"
label variable pitsubsidy "Point in time any subsidized marketplace coverage?"
label variable marsupwt "March Supplement Weight"
label variable newwt_lastyr "March Supplement Weight, 0 if infant"
label variable offer "Does your employer offer Health Insurance?"
label variable prior "Do you have ESI through a Prior Employer?"
label variable newsector "What sector is providing coverage?"
label variable newsize "What size employer provided the coverage?"
label variable eeprior "Coverage through a prior employer (dependents only, attribute of policyholder)"
label variable phline "Line# (A-LINENO) of first PH (deps who aren't ESI PH only)"
label variable siflag "Was coverage fully-insured or self-insured?"
label variable hmoflag "What type of plan are you covered by?"
label variable retflag "Is prior coverage retiree or COBRA? (universe is PRIOR=1 or EEPRIOR=1)"
label variable newsector2 "Sector of dependent coverage (for those with ESI as both PH and dependent"
label variable newsize2 "Size of employer covering dep coverage (for those with ESI as both PH and dep)"
label variable union "Coverage through union? (for ESI Policy holders only, non-self-employed)"
label variable eeunion "Coverage through a union? (for ESI deps only, based on PH attribute)"
label variable unionwork "Union? (for non-self-employed workers only, current employment status)"
label variable av "Actuarial Value  (active ESI policy holder records only)"
label variable avcellavg "Cell based average actuarial value (active ESI policy holder records only)"
label variable avplantype "Plan type used for AVs?"
label variable mspflag "Medicare Secondary Payer variable (all Medicare)"
label variable oopexp "OOP expenditures on OTC purchases and medical equipment (POTC-VAL + PMED-VAL)"
label variable oldstate "Old State Variable"
label variable mcdexpan "Is person in a Medicaid expansion state? (for all persons)"


/*Create value labels to label the values of each variable - 2 step process - first define the label, and then assign the label to the variable*/

label define esiph1 0 "no" 1 "yes"
label values esiph esiph1  

label define esidep1 0 "no" 1 "yes"
label values esidep esidep1

label define ophiph1 0 "no" 1 "yes"
label values ophiph ophiph1

label define ophidep1 0 "no" 1 "yes"
label values ophidep ophidep1

label define exchange1 0 "no" 1 "yes"
label values exchange exchange1

label define nmcaid1 0 "no" 1 "yes"
label values nmcaid nmcaid1

label define nmcare1 0 "no" 1 "yes"
label values nmcare nmcare1

label define champ1 0 "no" 1 "yes"
label values champ champ1

label define other1 0 "no" 1 "yes"
label values other other1

label define chipp1 0 "no" 1 "yes"
label values chipp chipp1

label define anycov1 0 "Infant born after calendar year" 1 "Coverage for all of year" 2 "No coverage for some of the year" 3 "No coverage for full year"
label values anycov anycov1

label define outtyp1 0 "no" 1 "yes, ESI" 2 "yes, OPHI" 3 "yes, other"
label values outtyp outtyp1

label define concurr1 0 "Infant born after calendar year" 1 "No months with concurrent coverage" 2 "Some months with concurrent coverage" 3 "Concurrent coverage all year"
label values concurr concurr1

label define subsidy1 0 "no" 1 "yes"
label values subsidy subsidy1

label define pitesiph1 0 "no" 1 "yes"
label values pitesiph pitesiph1

label define pitesidep1 0 "no" 1 "yes"
label values pitesidep pitesidep1

label define pitophiph1 0 "no" 1 "yes"
label values pitophiph pitophiph1

label define pitophidep1 0 "no" 1 "yes"
label values pitophidep pitophidep1

label define pitexchange1 0 "no" 1 "yes"
label values pitexchange pitexchange1

label define pitnmcaid1 0 "no" 1 "yes"
label values pitnmcaid pitnmcaid1

label define pitnmcare1 0 "no" 1 "yes"
label values pitnmcare pitnmcare1

label define pitchamp1 0 "no" 1 "yes"
label values pitchamp pitchamp1

label define pitother1 0 "no" 1 "yes"
label values pitother pitother1

label define pitchipp1 0 "no" 1 "yes"
label values pitchipp pitchipp1

label define now_anycov1 0 "insured" 1 "uninsured"
label values now_anycov now_anycov1

label define pitouttyp1 0 "no" 1 "yes, ESI" 2 "yes, OPHI" 3 "yes, other"
label values pitouttyp pitouttyp1

label define pitsubsidy1 0 "no" 1 "yes"
label values pitsubsidy pitsubsidy1

label define offer1 0 "n/a" 1 "coverage through current employer" 2 "offered, eligible, not enrolled" 3 "offered, not enrolled, not eligible" 4 "not offered"
label values offer offer1

label define prior1 0 "n/a" 1 "yes" 2 "no, current employer"
label values prior prior1

label define newsector1 0 "n/a" 1 "Private" 2 "Public, Federal" 3 "Public, State" 4 "Public, Local" 5 "Self-Employed, inc" 6 "Self-Employed, uninc"
label values newsector newsector1

label define newsize1 0 "n/a" 1 "less than 10" 2 "10 - 24" 3 "25 - 99" 4 "100 - 499" 5 "500 - 999" 6 "1000 or more"
label values newsize newsize1

label define eeprior1 0 "n/a" 1 "yes, prior" 2 "no, current employer"
label values eeprior eeprior1

label define siflag1 0 "n/a" 1 "self-insured" 2 "fully-insured"
label values siflag siflag1

label define hmoflag1 0 "n/a" 1 "HMO" 2 "PPO" 3 "POS" 4 "HDED"
label values hmoflag hmoflag1

label define retflag1 0 "n/a" 1 "retiree" 2 "COBRA"
label values retflag retflag1

label define newsector21 0 "n/a" 1 "Private" 2 "Public, Federal" 3 "Public, State" 4 "Public, Local" 5 "Self-Employed, inc" 6 "Self-Employed, uninc"
label values newsector2 newsector21

label define newsize21 0 "n/a" 1 "less than 10" 2 "10 - 24" 3 "25 - 99" 4 "100 - 499" 5 "500 - 999" 6 "1000 or more"
label values newsize2 newsize21

label define union1 0 "n/a" 1 "yes, union" 2 "no, not union"
label values union union1

label define eeunion1 0 "n/a" 1 "yes, union" 2 "no, not union"
label values eeunion eeunion1

label define unionwork1 0 "n/a" 1 "yes, union" 2 "no, not union"
label values unionwork unionwork1

label define avplantype1 -9 "n/a" 1 "HMO" 2 "PPO" 3 "POS" 5 "HRA" 6 "HSA"
label values avplantype avplantype1

label define mspflag1 0 "Person does not have Medicare" 1 "Medicare is secondary (ESI Primary)" 2 "Medicare is primary (may or may not have ESI)"
label values mspflag mspflag1

label define mcdexpan1 0 "no" 1 "yes"
label values mcdexpan mcdexpan1

label define oldstate1 11 "Maine" 12 "New Hampshire" 13 "Vermont" 14 "Massachusetts" 15 "Rhode Island" 16 "Connecticut" 21 "New York" 22 "New Jersey" 23 "Pennsylvania" 31 "Ohio" 32 "Indiana" 33 "Illinois" 34 "Michigan" 35 "Wisconsin" 41 "Minnesota" 42 "Iowa" 43 "Missouri" 44 "North Dakota" 45 "South Dakota" 46 "Nebraska" 47 "Kansas" 51 "Delaware" 52 "Maryland" 53 "District of Columbia" 54 "Virginia" 55 "West Virginia"  56 "North Carolina" 57 "South Carolina" 58 "Georgia" 59 "Florida" 61 "Kentucky" 62 "Tennessee" 63 "Alabama" 64 "Mississippi" 71 "Arkansas" 72 "Louisiana" 73 "Oklahoma" 74 "Texas" 81 "Montana" 82 "Idaho" 83 "Wyoming" 84 "Colorado" 85 "New Mexico" 86 "Arizona" 87 "Utah" 88 "Nevada" 91 "Washington" 92 "Oregon" 93 "California" 94 "Alaska" 95 "Hawaii"
label values oldstate oldstate1

